<!DOCTYPE html>
<html lang="zh">

<head>
    <title>{block name="title"}{$title|default=''}{if !empty($title)} · {/if}{:sysconf('site_name')}{/block}</title>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=0.4">
    <link rel="shortcut icon" href="{:sysconf('site_icon')}">
    <link rel="stylesheet" href="__ROOT__/static/plugs/awesome/fonts.css?at={:date('md')}">
    <link rel="stylesheet" href="__ROOT__/static/plugs/layui/css/layui.css?at={:date('md')}">
    <link rel="stylesheet" href="__ROOT__/static/theme/css/console.css?at={:date('md')}">
	
    {block name="style"}{/block}
    <script>window.ROOT_URL = '__ROOT__';</script>
    <script src="__ROOT__/static/plugs/jquery/pace.min.js"></script>
</head>
<style type="text/css">
    .common-details-bottom{
        position: absolute;
        /* top: 50px; */
        bottom: 0;
        overflow: hidden;
    }
    @media screen and (max-width: 1020px) {
    .common-details-bottom{
        display: none;
    }
}
</style>
<body class="layui-layout-body">
{block name='body'}
<div class="layui-layout layui-layout-admin layui-layout-left-hide">

    <!-- 顶部菜单 开始 -->
    <div class="layui-header notselect">
        <a href="{:url('@')}" class="layui-logo layui-elip">
            {:sysconf('app_name')} {if sysconf('app_version')}<sup class="padding-left-5">{:sysconf('app_version')}</sup>{/if}
        </a>
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item" lay-unselect>
                <a class="text-center" data-target-menu-type>
                    <i class="layui-icon layui-icon-spread-left"></i>
                </a>
            </li>
            {foreach $menus as $oneMenu}
            <li class="layui-nav-item">
                <a data-menu-node="m-{$oneMenu.id}" data-open="{$oneMenu.url}">
                    {notempty name='oneMenu.icon'}<span class='{$oneMenu.icon} padding-right-5'></span>{/notempty}

                    <span>{$oneMenu.title|default=''}</span>
                     {if $oneMenu.id == 232}<span class="layui-badge font-s2" style="top: 20%;left: 74%;">惠</span>{/if}
                </a>
            </li>
            {/foreach}
        </ul>
        <ul class="layui-nav layui-layout-right">
          <!--   <li lay-unselect class="layui-nav-item"><a data-reload><i class="layui-icon layui-icon-refresh-3"></i></a></li> -->
            {notempty name='Think.session.user.username'}
            <li class="layui-nav-item">
               <!--  <dl class="layui-nav-child"> -->
                   <!--  <dd lay-unselect><a data-modal="{:url('admin/index/info',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-set-fill margin-right-5"></i>基本资料</a></dd>
                    <dd lay-unselect><a data-modal="{:url('admin/index/pass',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-component margin-right-5"></i>安全设置</a></dd> -->
<!-- 
                    {if auth('admin/index/buildoptimize')}
                    <dd lay-unselect><a data-modal="{:url('admin/index/buildOptimize')}"><i class="layui-icon layui-icon-template-1 margin-right-5"></i>压缩发布</a></dd>
                    {/if}
                     -->
          <!--           {if auth('admin/index/clearruntime')}
                    <dd lay-unselect><a data-modal="{:url('admin/index/clearRuntime')}"><i class="layui-icon layui-icon-fonts-clear margin-right-5"></i>清理缓存</a></dd>
                    {/if} -->
               <!--      {notempty name='GLOBALS.AdminUserRightOption'}{foreach $GLOBALS.AdminUserRightOption as $option}{if auth($option.node)}
                    <dd lay-unselect><a data-{$option.type}="{$option.action}"><i class="{$option.icon} margin-right-5"></i>{$option.title}</a></dd>
                    {/if}{/foreach}{/notempty} -->
                <!--     <dd lay-unselect><a data-confirm="确定要退出登录吗？" data-load="{:url('admin/login/out')}"><i class="layui-icon layui-icon-release margin-right-5"></i>退出登录</a></dd> -->
              <!--   </dl> -->
                <a data-confirm="确定要退出登录吗？" data-load="{:url('admin/login/out')}"><i class="layui-icon layui-icon-release margin-right-5"></i>退出登录</a>
               <!--  <a><span><i class="layui-icon layui-icon-username margin-right-5"></i> {:session('user.username')}</span></a> -->
            </li>
            {else}
            <li class="layui-nav-item">
                <a data-href="{:url('@admin/login')}"><i class="layui-icon layui-icon-username"></i> 立即登录</a>
            </li>
            {/notempty}
        </ul>
    </div>
    <!-- 顶部菜单 结束 -->

    <!-- 左则菜单 开始 -->
    <div class="layui-side layui-bg-black notselect">
        <div class="layui-side-scroll">

            {foreach $menus as $oneMenu}
            {notempty name='oneMenu.sub'}
            <ul class="layui-nav layui-nav-tree layui-hide" data-menu-layout="m-{$oneMenu.id}">
                {foreach $oneMenu.sub as $twoMenu}
                {empty name='twoMenu.sub'}
                <li class="layui-nav-item">
                    <a data-target-tips="{$twoMenu.title}" data-menu-node="m-{$oneMenu.id}-{$twoMenu.id}" data-open="{$twoMenu.url}">
                        <span class='{$twoMenu.icon|default="layui-icon layui-icon-link"}'></span>
                        <span class="nav-text padding-left-5">{$twoMenu.title}</span>
                         {if $oneMenu.id == 199}<span class="layui-badge font-s2" style="top: 30%;">惠</span>{/if}
                    </a>
                </li>
                {else}
                <li class="layui-nav-item" data-submenu-layout='m-{$oneMenu.id}-{$twoMenu.id}'>
                    <a data-target-tips="{$twoMenu.title}" style="background:#393D49">
                        <span class='nav-icon layui-hide {$twoMenu.icon|default="layui-icon layui-icon-triangle-d"}'></span>
                        <span class="nav-text padding-left-5">{$twoMenu.title}</span>
                    </a>
                    <dl class="layui-nav-child">
                        {foreach $twoMenu.sub as $thrMenu}
                        <dd>
                            <a data-target-tips="{$thrMenu.title}" data-open="{$thrMenu.url}" data-menu-node="m-{$oneMenu.id}-{$twoMenu.id}-{$thrMenu.id}">

                                <span class='nav-icon padding-left-5 {$thrMenu.icon|default="layui-icon layui-icon-link"}'></span>
                                <span class="nav-text padding-left-5">{$thrMenu.title}</span>
                            </a>
                        </dd>
                        {/foreach}
                    </dl>
                </li>
                {/empty}
                {/foreach}
            </ul>
            {/notempty}
            {/foreach}

        </div>
    <!-- 公共信息 开始 -->

    <div class="common-details-bottom">
    <div class="margin-bottom-15"><i id="togoogleinfo" class="layui-icon layui-icon-down" style="font-size: 20px;"></i></div>
    <div class="common-details-box">
   <!--  <div class="margin-bottom-15"><i class="layui-icon layui-icon-username" style="font-size: 30px;"></i>-<small id="timeer"></small></div> -->
    <div class="layui-row layui-col-space15">

        <div class="layui-col-md12 margin-bottom-15">
            <div class="layui-row">

                <div class="margin-10">
                    <div class="font-s14">欢迎,{$userinfo['db1']['username']}</div>

                </div>
                <div class="">
                    <div class="font-s14">
                        
 {switch name="userinfo.db1.authorize" }
    {case value='0'}<a class="margin-10" href="javascript:;"><i class="layui-icon" style="font-size: 32px;color:#FFB800 "></i>访客</a>{/case}
    {case value='1'}<a class="margin-10" href="javascript:;"><i class="layui-icon" style="font-size: 32px;color:#009688 "></i>超级管理员</a>{/case}
    {case value='2'}<a class="margin-10" href="javascript:;"><i class="layui-icon" style="font-size: 32px;color:#FF5722 "></i>企业管理员</a>{/case}
    {case value='3'}<a class="margin-10" href="javascript:;"><i class="layui-icon" style="font-size: 32px;color:#FF5722 "></i>部门经理</a>{/case}
    {case value='4'}<a class="margin-10" href="javascript:;"><i class="layui-icon" style="font-size: 32px;color:#FF5722 "></i>员工</a>{/case}
    {case value='5'}<a class="margin-10" href="javascript:;"><i class="layui-icon" style="font-size: 32px;color:#FF5722 "></i>保安经理</a>{/case}
    {case value='6'}<a class="margin-10" href="javascript:;"><i class="layui-icon" style="font-size: 32px;color:#FF5722 "></i>门卫</a>{/case}
    {case value='8'}<a class="margin-10" href="javascript:;"><i class="layui-icon" style="font-size: 32px;color:#FF5722 "></i>物业管理员</a>{/case}
    {default  /}访客
 {/switch}

                    </div>

                </div>

                <div class="margin-10">
                    <div class="font-s12">登录时间,{$userinfo['db1']['login_at']}</div>

                </div>

            </div>
        </div>
        {if $userinfo['db2']}
              <div class="layui-col-md12 margin-bottom-15">
            <div class="layui-row">
                <div class="text-center">
                   <!--  <i class="layui-icon color-orange" style="font-size:60px;line-height:72px">&#xe65e;</i> -->
                </div>
                <div class="margin-10">
                    <div class="font-s12">{$userinfo['db2']['company_name']|default=""}</div>
                </div>
                <div class="margin-10">
                    <div class="font-s12">{$userinfo['db2']['dept_name']|default=""}</div>
                </div>


            </div>
        </div>
        {/if}

    </div>

</div>
    </div>


    <!-- 公共信息结束 -->
    </div>
    <!-- 左则菜单 结束 -->

    <!-- 主体内容 开始 -->
    <div class="layui-body layui-bg-gray">{block name='content'}{/block}</div>
    <!-- 主体内容 结束 -->

</div>
{/block}
<script src="__ROOT__/static/plugs/layui/layui.all.js"></script>
<script src="__ROOT__/static/plugs/require/require.js"></script>
<script src="__ROOT__/static/admin.js"></script>
	<script src="__ROOT__/static/assets/js/auth.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    $("#togoogleinfo").click(function(){
        if($(this).hasClass('layui-icon-up')){
            
            $(this).addClass('layui-icon-down')
            $(this).removeClass("layui-icon-up");
        }else{
            $(this).removeClass("layui-icon-down");
            $(this).addClass('layui-icon-up')
        }

        $(".common-details-box").toggle(2000);

  });
});

    </script>
{block name='script'}{/block}
</body>

</html>
